// 路由中间件(在页面前运行)
// 可做路由权限验证
export default ({app,route, req, res, redirect})=>{
  // app.router.beforeEach((to,from,next)=>{
  //   console.log('在哪里',from)
  //   console.log('去何处',to)
  //   next()
  // })
  console.log(route)
  let isClient = process.client;
  let isServer = process.server;
  //在服务端
  if (isServer) {
    console.log('服务端',isServer)
  }
  //在客户端
  if (isClient) {
    document.documentElement.scrollTop = 0;
    document.body.scrollTop = 0;
    console.log('客户端',isClient)
  }
}
